package com.cloudlead.common.worker.validator;

import java.lang.annotation.Annotation;

import javax.validation.Payload;

import com.fasterxml.jackson.annotation.JsonTypeName;

@SuppressWarnings("all")
@JsonTypeName("required")
public class NotNullValidator extends Validator implements
		javax.validation.constraints.NotNull {

	private String message;

	private Class<?>[] groups;

	private Class<? extends Payload>[] payload;

	public NotNullValidator() {
		super();
		message = "{javax.validation.constraints.NotNull.message}";
	}

	public NotNullValidator(String message, Class<?>[] groups,
			Class<? extends Payload>[] payload) {
		super();
		this.message = message;
		this.groups = groups;
		this.payload = payload;
	}

	@Override
	public Class<? extends Annotation> annotationType() {
		return javax.validation.constraints.NotNull.class;
	}

	@Override
	public String message() {
		return message;
	}

	@Override
	public Class<?>[] groups() {
		return groups;
	}

	@Override
	public Class<? extends Payload>[] payload() {
		return payload;
	}

}
